Method and system for alignment of a pattern on a spatial coded slide image

ABSTRACT

A method for preparing a spatial coded slide image in which a pattern of the spatial coded slide image is aligned along epipolar lines at an output of a projector in a system for 3D measurement, comprising: obtaining distortion vectors for projector coordinates, each vector representing a distortion from predicted coordinates caused by the projector; retrieving an ideal pattern image which is an ideal image of the spatial coded pattern aligned on ideal epipolar lines; creating a real slide image by, for each real pixel coordinates of the real slide image, retrieving a current distortion vector; removing distortion from the real pixel coordinates using the current distortion vector to obtain ideal pixel coordinates in the ideal pattern image; extracting a pixel value at the ideal pixel coordinates in the ideal pattern image; copying the pixel value at the real pixel coordinates in the real slide image.

TECHNICAL FIELD

The present invention generally relates to the field ofthree-dimensional scanning of the surface geometry of an object, and,more particularly, to structured light stereoscopy.

BACKGROUND OF THE ART

Three-dimensional scanning and digitization of the surface geometry ofobjects is commonly used in many industries and services, and theirapplications are numerous. A few examples of such applications areinspection and measurement of shape conformity in industrial productionsystems, digitization of clay models for industrial design and stylingapplications, reverse engineering of existing parts with complexgeometry, interactive visualization of objects in multimedia,applications, three-dimensional documentation of artwork and artifacts,human body scanning for better orthotics adaptation, biometry orcustom-fit clothing.

The shape of an object is scanned and digitized using a ranging sensorthat measures the distance between the sensor and a set of points on thesurface. Different principles have been developed for range sensors.Among them, interferometry, time-of-flight and triangulation-basedprinciples are well-known principles that are each more or lessappropriate depending on the requirements on accuracy, the stand-offdistance between the sensor and the object, and the required depth offield.

Some triangulation-based range sensors are generally adequate for closerange measurements, such as inferior to a few meters. Using this type ofapparatus, at least two rays that converge to the same feature point onthe object are obtained from two different viewpoints separated by abaseline distance. From the baseline and two ray directions, therelative position of the observed point can be recovered. Theintersection of both rays is determined using the knowledge of one sidelength and two angles in the triangle, which actually is the principleof triangulation in stereovision. The challenge in stereovision is toefficiently identify which pixels correspond to each other in eachimage.

To simplify the problem, one can replace one of the light detectors(cameras) with a light projector that outputs a set of rays in knowndirections. In this case, it is possible to exploit the direction of theprojected rays and each detected ray reflected on the object surface tosolve the triangle. It is then possible to calculate the coordinates ofeach observed feature point relative to the basis of the triangle.

Although specialized light detectors can be used, digital CCD or CMOScameras are typically used.

For the projector, the light source can be a coherent source (laser) ornon-coherent source (e.g. white light) projecting a spot, a light planeor many other possible patterns of projection including a full-fieldpattern. A full-field pattern is a 2D pattern which can cover a portionor the whole of the projector's 2D field of illumination. In this case,a dense set of corresponding points can be matched in each image. Use ofa light projector facilitates the detection of reflected pointseverywhere on the object surface so as to provide a dense set ofmeasured surface points. However, the more complex the pattern will be,the greater the challenge will be to efficiently identify correspondingpixels and rays.

For this reason, one will further exploit properties from the theory ofprojective geometry. It has been well known in the field for at least 30years in the case of two views that one may exploit epipolar constraintsto limit the search of corresponding pixels to a single straight line,as opposed to the search in the entire image. This principle is widelyexploited both in passive and active (with a projector) stereovision.One example of this usage is a system in which two cameras and a laserprojector projecting a crosshair pattern are used. The arrangement ofthe two cameras and the laser is such that each of the laser planescomposing the crosshair is aligned within an epipolar plane of each ofthe cameras. Thus, one of the laser planes will always be imaged in thesame position in one image, independently of the observed geometry. Itis then possible to disambiguate between the two laser planes in theimage. This is a non-traditional application of epipolar geometry instructured light systems.

The epipolar geometry can be computed from calibration parameters orafter matching a set of points in two images. Thus, given a point in oneimage, it is possible to calculate the parameters of the equation of thestraight line (the epipolar line) in the second image where thecorresponding point will lay. Another approach consists in rectifyingthe two images, which means all epipolar lines will be horizontal andaligned. Rectifying images is thus advantageous since no furthercalculation needs to be performed for identifying pixels on the epipolarlines. Image rectification can be applied by software or even bycautiously aligning the relative orientation of one or the two cameras(or projector). In this case, the approach is referred to as hardwarealignment.

Several examples of hardware aligned cameras and projectors exist wherethe projector projects vertical stripes and the camera is aligned insuch a way that the epipolar lines are horizontal. This type ofalignment has been used in several other structured light systemsexploiting Gray code vertical patterns. Projecting vertical stripes isless demanding on the alignment of the projector and cameras, butreduces the spatial density of points from a single projected frame. Afull-field code can also be projected. The projector and camera areagain aligned in such a way that the coded pattern along each line isprojected along the epipolar lines in the projector slide. Under thesecircumstances, the scene geometry has nearly no effect on the directionand vertical separation of the row-coded pattern. These coded patternswill remain along a single line independently of the distance to theobject. However, the relevant information to capture 3D measurementswill be retrieved in the deformation of the code along the epipolarlines. This alignment with the epipolar lines makes it possible toproject a different code along each line.

Unfortunately, there is an unresolved issue with the application of theprinciple of epipolar geometry. Its reliability varies depending on thetype and quality of the projector lens. Actually, it does not accountfor lens distortion. In presence of lens distortion either for theprojector and the camera, epipolar lines will not be straight lines.They will be curved and cannot be assumed to strictly result from theintersection of the epipolar plane with the image plane. Distortion isgenerally more important for short range systems requiring lenses withshort focal lengths. Although it can be corrected after calibrationthrough software calculation for the camera, it cannot be correctedafterwards for the projector. In this case, a code initially alignedalong a straight line (epipolar) in the projector image (hereafterreferred to as slide image) will not be physically projected along astraight line after the lens and will thus not result in a goodalignment along the epipolar line in the image of the camera. For mostlenses, distortion increases towards the side and corners of the images.One will either lose these points, compensate with larger bands forencoding the signal along the distorted epipolar lines (thus reducingresolution of measurement) or apply more complex calculations that willtake away the initial goal of simplifying matching.

SUMMARY

According to one broad aspect of the present invention, there isprovided a method for preparing a spatial coded slide image in which apattern of the spatial coded slide image is aligned along epipolar linesat an output of a projector in a system for 3D measurement of a shape ofan object, having the projector and a camera in full-field structuredlight, comprising: obtaining a set of distortion vectors for projectorcoordinates of the projector, each the distortion vector representing adistortion from predicted coordinates caused by the projector;retrieving an ideal pattern image, wherein the ideal pattern image is anideal image of the spatial coded pattern aligned on ideal epipolarlines; creating a real slide image by, for each real pixel coordinatesof the real slide image, retrieving a current distortion vector from theset using the real pixel coordinates; removing distortion from the realpixel coordinates using the current distortion vector to obtain idealpixel coordinates in the ideal pattern image; extracting a pixel valueat the ideal pixel coordinates in the ideal pattern image; copying thepixel value at the real pixel coordinates in the real slide image.

In one embodiment, the step of creating a real slide image includescreating an electronic version of the real slide image and providing theelectronic version to a programmable projector.

In one embodiment, the step of extracting a pixel value includesinterpolating the pixel value.

In one embodiment, the pixel value is a level value.

According to another broad aspect of the present invention, there isprovided a method for facilitating matching of coded patterns between aprojected image and a captured image in a system for 3D measurement of ashape of an object, having a projector and a camera in full-fieldstructured light, comprising: calibrating the projector and the camerafor intrinsic and extrinsic parameters; preparing a spatial coded slideimage in which a pattern of the spatial coded slide image is alignedalong epipolar lines; projecting the spatial coded pattern on a sceneobject using the projector; observing the spatial coded pattern on theobject using the camera to generate a camera image; processing thecamera image to match codes with the projected image;

In one embodiment, the method further comprises undistorting andrectifying the camera image prior to the processing the camera image.

According to still another broad aspect of the present invention, thereis provided a method for setting up a system for 3D measurement of ashape of an object, having a projector with a fixed slide mask and acamera in full-field structured light, comprising: setting the lensaperture and focus; preparing a slide with a spatial coded slide image,mounting the slide rigidly with the projector lens and aligning a centerof the slide with an optical axis of the lens; adjusting rotation aroundthe optical axis of the lens and the translation of the projector alongthe optical axis of the lens so as to align the pattern code along theepipolar lines.

BRIEF DESCRIPTION OF THE DRAWINGS

The above-mentioned features and objects of the present disclosure willbecome more apparent with reference to the following description takenin conjunction with the accompanying drawings, wherein like referencenumerals denote like elements and in which:

FIG. 1 includes FIG. 1A, FIG. 1B and FIG. 1C, wherein FIG. 1A is anillustration of a grid, FIG. 1B is an illustration of the effect ofbarrel-type radial lens distortion and FIG. 1C is an illustration of theeffect of pincushion radial lens distortion;

FIG. 2 is a representation of the epipolar geometry;

FIG. 3 includes FIG. 3A and FIG. 3B, wherein FIG. 3A depicts a rear viewof a rectified configuration and FIG. 3B depicts a top view of arectified configuration;

FIG. 4 is an illustration of the rectification process;

FIG. 5 illustrates distortion compensation applied to the slide image;

FIG. 6 illustrates the deformation of an epipolar line by a real lens;

FIG. 7 is a flowchart of an example method for producing the realpattern;

FIG. 8 includes FIG. 8A and FIG. 8B, wherein FIG. 8A is an illustrationof a binary pattern and FIG. 8B is an illustration of the effect ofthresholding after interpolation;

FIG. 9 includes FIG. 9A and FIG. 9B, wherein FIG. 9A depicts apre-distorted slide section along with its corresponding ideal section,FIG. 9B depicts the corresponding ideal section;

FIG. 10 is a flowchart of an example method for adapting a fixed slidemask.

DETAILED DESCRIPTION

In order to find corresponding matches between the pattern projected bya projector and the pattern detected in the image captured by thecamera, the present invention allows aligning higher resolution code,even near the sides and corners of the image. The projector lens willdistort the image built on the projector slide. The slide is thephysical imager component that is located before the optics of theprojector. It is either a transmitting or reflecting imager component.The pattern codes aligned along ideal epipolar lines on the slide willthus result in curved lines instead of straight lines once projectedthrough the lens. The method therefore aligns the pattern codes with theactual epipolar lines after the lens instead of aligning the patterncodes on the hypothetical non-distorted straight lines on the projectorslide. The distortion induced by the lens optics of the projector isfirst modeled and the distortion model is then applied to deform thecoded patterns initially aligned along straight lines. The resultingcoded patterns on the slide are thus pre-curved. The distortion of theprojection lens then occurs as modeled and the coded patterns on theimage captured by the camera are straightened.

FIG. 1 shows an effect of radial lens distortion on a regular grid 101shown in FIG. 1A. Radial distortion can lead to either barrel typedistortion, shown at 102 in FIG. 1B, or pincushion type distortion,shown at 103 in FIG. 1C. The effect is well-known. Straight lines arecurved and the effect will be more important for short focal lengths.Although radial distortion is a very common type of distortion that iscompensated for in machine vision and photogrammetry, other types oflens distortion can also be compensated for. One other such example lensdistortion is tangential distortion.

The projection model for both the camera and the projector is a pinholewith lens distortion compensation. The pinhole model describes therelationship between a 3D point {tilde over (P)}_(w)=[x, y, z,l]^(T) inthe world reference frame, w, and the corresponding image pointã=[u,v,l]^(T). Here, the tilde superscript indicates homogeneouscoordinates. The relation is a projection defined as λã=K[R t]{tildeover (P)}_(w). In this equation, the matrix

$K = \begin{bmatrix}\alpha & 0 & u_{0} \\0 & \beta & v_{0} \\0 & 0 & 1\end{bmatrix}$

includes the camera intrinsic parameters, where (u₀, v₀) are thecoordinates of the principal point, α and β are the scale factors of theimage horizontal and vertical axes respectively, (R, t) are the 3×3rotation matrix and 3×1 translation vector describing the transformationfrom the world to the camera reference frame, and λ is an arbitraryscale factor. R and t encode the extrinsic parameters. In practice, dueto lens distortion, a point is not imaged at coordinates a predicted bythe projection, but at distorted coordinates a_(d). To compensate forthe distortion, the projection model is augmented with radial terms(e.g. k₁, k₂ when two terms are used) and optionally with two tangentialterms (e.g. p₁, p₂). These additional intrinsic parameters arerepresented in a vector d. The coordinates a_(d) can then be correctedusing the following relation a=a_(d)−δ(a_(d), d) where

${\delta \left( {a_{d},d} \right)} = \begin{bmatrix}{{x_{d}\left( {{k_{1}r_{d}^{2}} + {k_{2}r_{d}^{4}}} \right)} + {2p_{1}x_{d}y_{d}} + {p_{2}\left( {r_{d}^{2} + {2x_{d}^{2}}} \right)}} \\{{y_{d}\left( {{k_{1}r_{d}^{2}} + {k_{2}r_{d}^{4}}} \right)} + {2p_{2}x_{d}y_{d}} + {p_{1}\left( {r_{d}^{2} + {2y_{d}^{2}}} \right)}}\end{bmatrix}$ anda_(d) = (x_(d), y_(d)), [x_(d), y_(d), 1]^(T) = K⁻¹[u_(d), v_(d), 1]^(T)  andr_(d)² = x_(d)² + y_(d)².

Conversely, it is also useful to obtain the distorted coordinates fromideal, non-distorted pixel coordinates. In this case, a_(d) is soughtbut δ is a function of a_(d) and only a is given. There is no directmethod to inverse the distortion function unless it is explicitlycomputed at calibration. An inverse model based on a Taylor seriesapproximation can be used. However, for short focal lenses withsignificant distortion, this method increases the complexity. Indeed,additional terms are needed in the series development. An alternativemethod is to recursively approximate the inverse solution. Theadditional calculation is not relevant in the context of offlinecalibration. The recursion equations are:

a_(d)≈a+∂(a_(d),d)≈a+∂(a+∂(a_(d),d),d)≈ . . .

About 10 iterations are used to generate the inverse mapping. Theintrinsic parameters, including distortion, as well as the geometrictransformation between the projector and the camera can be calculatedbeforehand at calibration stage. The parameters describing thisgeometric transformation are referred to as the extrinsic parameters. Afew methods are proposed in the art to obtain these parameters for aprojector-camera combination. After obtaining the parameters, it ispossible to calculate both the distorted and non-distorted pixels givenone or the other.

The projective geometry of two, cameras, or equivalently the combinationof one camera and a projector, describes the relationship between thepositions of a point in one image with its corresponding point in thesecond image. Given a point in one image, its corresponding point laysalong a straight line in the second image. This is illustrated in FIG.2, where points O and O′ are the projection centers of the devices and Pis a point in 3D space. The set composed of P, O and O′ defines anepipolar plane ω that intersects both image planes π and π′ along linesl and l′. Lines l and l′ are epipolar lines. So given a point p in theimage 110, its corresponding point, p′, in image 111 would be foundalong l′. Conversely, the corresponding point to p′ in image 110 wouldbe found along line l. Given a point in one image, it is possible tocalculate the equation of the corresponding epipolar line using eitherthe essential or the fundamental matrix. These matrices can be obtainedafter calibration. Interestingly, the orientation of the epipolar linesis dictated by the vergence of the stereo arrangement. More precisely,when both image planes π and π′ are parallel, the epipolar lines willall be parallel as well. In the particular case of two parallel imageplanes π and π′ that are also parallel to the baseline and defined asthe segment joining the two projection centers, the epipolar lines willbe parallel to this baseline.

Referring now to FIG. 3A, image planes 113 and 114 can be adjusted insuch a way that the epipolar lines will lay on the same lines in theimages. The two image planes are then referred to as rectified. Theepipolar plane is shown at 112. In FIG. 3B, a top view of the twoparallel image planes is shown. When the projector-camera arrangementdoes not match this exact configuration, it is also possible to definetwo virtual planes in the exact configuration and transform the actualimages into rectified images by software calculation. The principle isillustrated in FIG. 4 where a pixel p in original image 110 is copied toits corresponding position, p_(rect), in the rectified image 113. Thesame principle would apply to the pair of images 111 and 114.

In a full-field structured light system where a spatial coded pattern isprojected to facilitate decoding, a method is proposed to align thecodes of the projector along the epipolar lines. The code then encodes anon-ambiguous position on a line compared with a position in the wholeimage. A system with spatial codes nearly aligned along the epipolar canbe proposed to facilitate correspondence matching. In the presence ofdistortion, one cannot align the codes along the epipolar lines bysimply using the epipolar geometry. In fact, the epipolar lines are notstraight lines on the slide and they cannot be obtained simply byintersecting the epipolar plane with the image (slide) planes. The codescan be aligned along curved lines that will be straight (in a lightplane) once outputted from the projector.

As will be readily understood, only the codes present on the projectorslide need to be adjusted for projector distortion. These codes will bealigned with the epipolar lines at the output of the projector. Theimage captured by the camera will not suffer from the projectordistortion. The image captured by the camera can simply be processed toremove the camera distortion caused by the camera optics, if need be.

In order to make sure that coded patterns are projected along theepipolar lines, the arrangement composed of the projector and camera isfirst calibrated for the intrinsic and extrinsic parameters. Then,considering an ideal image of the coded patterns on all ideal epipolarlines, typically in the rectified configuration, the image slide that isto be projected is the same image where the position of each pixel iscorrected in the direction of δ(a,d). This is illustrated in FIG. 5. Theideal pinhole model is shown at 122. The output image after the pinholeis shown at 121 while the projected image is shown at 120. In an idealcase without distortion by the projector, a spatial code provided online 127 of the projected image 120 would be projected at line 123 onthe output image 121. Line 127 would be chosen such that line 123 wouldbe aligned on the epipolar line. However, to compensate for thedistortion by the projector, rather than being provided on ideal line127, the spatial code is rather aligned along one of the actualprojected curves 124. This ensures that, after distortion, it is stillprojected at line 123 and therefore aligned on the epipolar line. For agiven point, the vector between the ideal and distorted pixels is shownat 125. FIG. 6 illustrates the resulting effect with a real lens 126.

An example of a method to produce a real slide image to be carried outin practice is shown at 130 in FIG. 7. Distortion vectors for theprojector coordinates are first obtained. These can be determined, forexample, using the projector model detailed above. As will be readilyunderstood, other projector models could be used without departing fromthe invention with more or less radial and/or tangential terms and/orwith other terms of distortion. Each distortion vector represents adistortion from predicted coordinates caused by the projector at theparticular projector coordinates. After loading the ideal pattern imageinto memory 131, one will process, at 132, each pixel of the real slideby first removing distortion from the real pixel coordinates using thedistortion vectors and obtaining the pixel coordinates in the idealreference image 133. In this example, the optical axis will intersectthe slide at its center. This intersection point defines the principalpoint of the slide. After calculating these pixel coordinates in theideal pattern image, the pixel value from the ideal pattern image atthese pixel coordinates will be obtained. This pixel value can bedirectly extracted (0-order interpolation) from the nearest pixel in theideal image or it can be obtained using subpixel interpolation 134. Thepixel value may be a level value representing color and/or intensity.The pixel value is finally copied to the current pixel in the real slideimage 135. This process is repeated for all pixels of the real slideimage 136.

This way, one makes sure that the coded patterns are projected along theepipolar lines even in presence of lens distortion. Then, the patternwill be reflected on the scene objects before being observed in thecamera image. The camera image will be undistorted and rectified bysoftware based on the well-known principle illustrated in FIG. 4 beforethe image is processed to match codes with the projector. Alternately,the camera image could be processed directly without applyingrectification. The distance to the object can then be obtained from thedisparity along the epipolar line corresponding to the matched points.In other words, from the corresponding positions in the projector slideand camera image, it is possible to obtain the 3D coordinates of thescene point by triangulation. The basis of the triangle corresponds tothe baseline.

Some coded patterns may be binary images to increase the signal-to-noiseratio or to get increased precision when 3D positions are calculatedfrom points located at the image edges. Although the process that hasjust been described will work well to compensate lens distortion, theresulting image is obtained after subpixel interpolation, which willintroduce gray level pixels even if the ideal pattern is binary.Imposing a binary value by thresholding will deform the shape of theedge in the projected image. In FIG. 8A, an example of an ideal spatialcode is shown at 140. At 141 in FIG. 8B, the potential effect ofthresholding is shown.

To preserve binary patterns while compensating for distortion, somefurther steps can be carried out. It is possible to better preservevertical edges in an ideal binary pattern composed of rectangles. Oneway to do that is to initialize the pattern image with value 1 beforecalculating the distorted center of each of the 0 state rectangles anddrawing it on the slide. FIG. 9A illustrates a section of the resultingslide at 150. The expected projected pattern that will be “undistorted”by the optics is shown at 151 in FIG. 9B. Two radial terms (k₁ and k₂)were used to generate the slide section shown at 150 in FIG. 9A. In thisexample, the modeled lens is a fixed focal length Fujinon 9 mm, modelHF9HA-1B f/1.4 exploited at f/2 and focalized at a distance of 350 mm.The values obtained for k₁ and k₂ after calibration arek₁=−0.003162295864393 and k₂′=0.000023351397144. More continuoushorizontal edges can also be obtained after dividing each rectangle intoseveral narrower subrectangles with the same height and applying thesame procedure to each of these subrectangles. This is especiallyinteresting for a fixed slide mask where the resolution is usuallyhigher than most programmable projectors. Other embodiments of themethod are also possible to reach the same goal.

When the projector slide is programmable, the pattern can bereconfigured at runtime. In this case, the pattern code can be adaptedbased on the calibration parameters.

Conversely, when a projector is mounted with a fixed pattern on a slide,the epipolar geometry can be obtained from the mechanical design of thearrangement. An example method 160 for setting up a system for 3Dmeasurement is shown in FIG. 10. In order to consider lens distortion,the distortion parameters of the lens are calibrated beforehand at 162,after the aperture and focus have been adjusted at 161. Then, the fixedslide mask is created based on these parameters and using the exampleprocedure detailed in FIG. 7 and represented in FIG. 10 at 163. Thisprocedure was carried out to produce the image shown at 150 in FIG. 9Awith the Fujinon lens described above. In the next step, the mask ismounted with the lens, and the center of distortion is precisely alignedat 164. This is done with the help of a calibrated camera that capturesthe projected pattern on a plane. The projection matrix then reduces toa homography added with the same distortion model. A homography, H, is aone-to-one projective mapping between 2D coordinates of the mask and thecamera image. It is thus possible to align the principal point of theslide with the optical axis of the lens. Actually, when the optical axisintersects with the principal point of the slide, the followingexpression is minimized:

$\varphi = {\sum\limits_{\Omega}^{\;}{{{a_{p} - {Ha}_{c}}}^{2}.}}$

In this expression, a_(p) is a point on the projector slide afterremoving distortion using the projector distortion model, while a_(c) isa point in the camera image after removing the distortion using thecamera distortion model. Ha_(c) is the point a_(c) mapped to theundistorted projector slide. {dot over (Ω)} is a set of matched pointsbetween the projector slide and the camera image. Finally, the assembledprojector combining the source, the slide mask and the projecting lensis rotated around its optical axis and its position is fine tuned tooptimize the alignment of the code along the epipolar lines. This isshown at 165. To do so, the camera mounted on the sensor is used. Thecamera image is rectified and the alignment of the codes alonghorizontal lines is ensured.

Although the above description relates to example embodiment aspresently contemplated by the inventors, it will be understood that theinvention in its broad aspect includes equivalents of the elementsdescribed herein.

The embodiments described above are intended to be exemplary only. Thescope of the invention is therefore intended to be limited solely by theappended claims.

1. A method for preparing a spatial coded slide image in which a patternof said spatial coded slide image is aligned along epipolar lines at anoutput of a projector in a system for 3D measurement of a shape of anobject, having the projector and a camera in full-field structuredlight, comprising: obtaining a set of distortion vectors for projectorcoordinates of said projector, each said distortion vector representinga distortion from predicted coordinates caused by said projector;retrieving an ideal pattern image, wherein said ideal pattern image isan ideal image of the spatial coded pattern aligned on ideal epipolarlines; creating a real slide image by, for each real pixel coordinatesof the real slide image, retrieving a current distortion vector fromsaid set using said real pixel coordinates; removing distortion fromsaid real pixel coordinates using the current distortion vector toobtain ideal pixel coordinates in the ideal pattern image; extracting apixel value at the ideal pixel coordinates in the ideal pattern image;copying the pixel value at the real pixel coordinates in the real slideimage.
 2. The method as claimed in claim 1, wherein said creating a realslide image includes creating an electronic version of said real slideimage and providing said electronic version to a programmable projector.3. The method as claimed in claim 1, wherein said extracting a pixelvalue includes interpolating said pixel value.
 4. The method as claimedin claim 1, wherein said pixel value is a level value.
 5. A method forfacilitating matching of coded patterns between a projected image and acaptured image in a system for 3D measurement of a shape of an object,having a projector and a camera in full-field structured light,comprising: calibrating the projector and the camera for intrinsic andextrinsic parameters; preparing a spatial coded slide image in which apattern of said spatial coded slide image is aligned along epipolarlines by carrying out the steps of claim 1; projecting the spatial codedpattern on a scene object using the projector; observing the spatialcoded pattern on the object using the camera to generate a camera image;processing the camera image to match codes with the projected image; 6.The method as claimed in claim 5, further comprising undistorting andrectifying the camera image prior to said processing the camera image.7. A method for setting up a system for 3D measurement of a shape of anobject, having a projector with a fixed slide mask and a camera infull-field structured light, comprising: setting the lens aperture andfocus; carrying the steps of claim 1; mounting said slide rigidly withthe projector lens and aligning a center of said slide with an opticalaxis of the lens; adjusting rotation around the optical axis of the lensand the translation of the projector along the optical axis of the lensso as to align the pattern code along the epipolar lines.